from pympler import asizeof


class MemTable:
    user_data = {}

    def clear(self):
        self.user_data = {}

    def get(self, key: str):
        return self.user_data.get(key)

    def set(self, key: str, value):
        self.user_data[key] = value

    def get_mem_size(self):
        size = asizeof.asizeof(self.user_data)
        print(f"Size of user_data: {size} bytes")
        return size


memTbl = MemTable()
